package main

func main() {
	println(countSegments("      "))
}

/**
 *	countSegments
 *	@Description:
 *	@param s string
 *	@return count int
 */
func countSegments(s string) (count int) {
	word := ""
	for i := range s {
		if s[i] != ' ' {
			word += string(s[i])
			continue
		}
		if word != "" {
			println(word)
			count++
			word = ""
		}
	}
	if word != "" {
		count++
	}
	return
}
